﻿namespace MsTestUtilities.SolutionAnalysis
{
    public class CopyToOutputDirectory
    {
        private  Value _value;

        private enum Value {
            Never,
            CopyIfNewer,
            Always,
        }

        private CopyToOutputDirectory(Value value)
        {
            _value = value;
        }

        public static CopyToOutputDirectory Never = new CopyToOutputDirectory(Value.Never);
        
        public static CopyToOutputDirectory CopyIfNewer = new CopyToOutputDirectory(Value.CopyIfNewer);
        
        public static CopyToOutputDirectory Always = new CopyToOutputDirectory(Value.Always);

        public static CopyToOutputDirectory Parse(string text)
        {
            switch (text)
            {
                case "PreserveNewest":
                    return CopyIfNewer;
                case "Always":
                    return Always;
                default:
                    return Never;
            }
        }
    }
}
